-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Hive listener integration #605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
I might have run into stackabletech/hdfs-operator#686 during development. I recognized that I can have an empty string in my discovery configMap from time to time. Behaviour appears to be flaky, but yet more often then not the emtpy string appears: Expected
Flaky faulty one
|
…tackabletech/hive-operator into feat/hive-listener-integration
🟢
|
…tackabletech/hive-operator into feat/hive-listener-integration
Co-authored-by: Malte Sander <[email protected]>
…tackabletech/hive-operator into feat/hive-listener-integration
tests/templates/kuttl/kerberos-hdfs/70-install-access-hive.yaml.j2
Outdated
Show resolved
Hide resolved
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: test-hive-metastore | ||
spec: | ||
type: ClusterIP # cluster-internal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we test for the metrics service as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done with 35c8592
…l.j2 Co-authored-by: Malte Sander <[email protected]>
Co-authored-by: Nick <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See suggestions
// A version value is required, and we do want to use the "recommended" format for the other desired labels | ||
"none", | ||
&rolegroup_ref.role, | ||
&rolegroup_ref.role_group, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would like to add a helper in stackable-operator to produce recommended labels for "role" level things like this.
We should probably also do the same for things that shouldn't be versioned too. Perhaps they can just become Option<T>
so that we don't need to add another function.
Leave as is for now, and once that method is available, we can go and update it (before the 25.7 release hopefully).
fn metastore_default_listener_class() -> String { | ||
"cluster-internal".to_string() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For mine, I used a constant:
pub const DEFAULT_LISTENER_CLASS: &str = "cluster-internal";
and
fn metastore_default_listener_class() -> String { | |
"cluster-internal".to_string() | |
} | |
fn metastore_default_listener_class() -> String { | |
DEFAULT_LISTENER_CLASS.to_owned() | |
} |
#[snafu(display("invalid owner name for discovery ConfigMap"))] | ||
InvalidOwnerNameForDiscoveryConfigMap, | ||
|
||
#[snafu(display("failed to build Metadata"))] | ||
MetadataBuild { | ||
source: stackable_operator::builder::meta::Error, | ||
}, | ||
#[snafu(display("{role} listener has no adress"))] | ||
RoleGroupListenerHasNoAddress { role: String }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RoleGroupListenerHasNoAddress { role: String }, | |
RoleListenerHasNoAddress { role: String }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a suggestion to fix its usage below.
let listener_address = listener_ref | ||
.status | ||
.and_then(|s| s.ingress_addresses?.into_iter().next()) | ||
.context(RoleGroupListenerHasNoAddressSnafu { role })?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.context(RoleGroupListenerHasNoAddressSnafu { role })?; | |
.context(RoleListenerHasNoAddressSnafu { role })?; |
"thrift://{}:{}", | ||
listener_address.address, | ||
listener_address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should avoid using unnamed placeholders.
"thrift://{}:{}", | |
listener_address.address, | |
listener_address | |
"thrift://{address}:{port}", | |
address = listener_address.address, | |
port = listener_address |
@@ -2,4 +2,4 @@ | |||
apiVersion: kuttl.dev/v1beta1 | |||
kind: TestAssert | |||
commands: | |||
- script: kubectl exec -n $NAMESPACE test-metastore-0 -- python /tmp/test_metastore.py -m hive-metastore-default-0.hive-metastore-default.$NAMESPACE.svc.cluster.local | |||
- script: kubectl exec -n $NAMESPACE test-metastore-0 -- python /tmp/test_metastore.py -m hive-metastore.$NAMESPACE.svc.cluster.local |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be quoting variables used on the CLI as a habit.
- script: kubectl exec -n $NAMESPACE test-metastore-0 -- python /tmp/test_metastore.py -m hive-metastore.$NAMESPACE.svc.cluster.local | |
- script: kubectl exec -n "$NAMESPACE" test-metastore-0 -- python /tmp/test_metastore.py -m "hive-metastore.$NAMESPACE.svc.cluster.local" |
But I'm sure we aren't doing that in all the other tests.
Description
Adds listener Support
Definition of Done Checklist
Author
Reviewer
Acceptance